<template>
  <div class="educational">
    <van-collapse v-model="activeNameschild" :border="false">
      <van-collapse-item name="2">
        <template #title>
          <span>
            工作经历
            <!-- <van-icon name="question-o" /> -->
          </span>
          <a href="javascript:;" class="edcatadd" @click="workExperienceAdd">添加</a>
        </template>
        <div v-for="(item,index) in workInfoOutVos" :key="index+'workInfoOutVos'">
          <div class="edycatimove">
            <span class="educationalchild">
              {{item.company}}
              <!-- <van-icon name="question-o" /> -->
            </span>
            <a href="javascript:;" class="edcatadd" @click="remove(item)">编辑</a>
          </div>
          <div style=" text-align: left">
            <p class="educationalchildPC">{{item.startTime}}~{{item.endTime}}</p>
            <p class="educationalchildPC">
              {{item.job}}
              <span class="zwfg">|</span>
              {{item.jobCategoryText}}
            </p>
            <p class="educationalchildPC"></p>
          </div>
          <van-divider color="#E8E8E8" />
        </div>
      </van-collapse-item>
    </van-collapse>
  </div>
</template>
<script>
export default {
  data () {
    return {
      activeNames: [],
      activeNameschild: [],
      workInfoOutVos: [],
      finished: false,
      resumeid: ''
    }
  },
  computed: {},
  methods: {
    workExperienceAdd () {
      if (this.resumeid === '') {
        this.$notify('请先提交个人信息')
        return false
      }
      this.$router.push({
        name: 'workExperienceAdd',
        query: {
          resumeid: this.resumeid
        }
      })
    },
    remove (item) {
      //  console.log(item, "item");
      sessionStorage.setItem('workExperienceAdd', JSON.stringify(item))
      this.$router.push({
        name: 'workExperienceAdd',
        query: {
          resumeid: this.resumeid,
          id: 4
        }
      })
    },
    resumeidjy (resumeid, workInfoOutVos) {
      this.resumeid = resumeid
      if (workInfoOutVos) {
        this.workInfoOutVos = workInfoOutVos
        for (let i = 0; i < this.workInfoOutVos.length; i++) {
          this.workInfoOutVos[i].startTime = /\d{4}-\d{1,2}-\d{1,2}/g
            .exec(this.workInfoOutVos[i].startTime)
            .toString()
          this.workInfoOutVos[i].endTime = /\d{4}-\d{1,2}-\d{1,2}/g
            .exec(this.workInfoOutVos[i].endTime)
            .toString()
        }
      }

      console.log('resumeid', resumeid)
    },
    activeChild () { }
  },
  created () { }
}
</script>
<style scoped></style>
